package binderon.com.bo.imp;

import binderon.com.bo.BaseBO;
import binderon.com.bo.transformer.BeanTransformer;
import binderon.com.dao.BaseDao;
import binderon.com.model.BaseModel;

public class BaseBoImp implements BaseBO{

	private BaseDao dao;
	private BeanTransformer modelToBo;
	private BeanTransformer BoToModel;
	
	
	public BaseModel save(BaseModel bean) {
		return getDao().save(bean);
	}

	public BaseModel update(BaseModel bean) {
		
		return getDao().update(bean);
	}

	public void delete(BaseModel bean) {
		getDao().delete(bean);
		
	}

	public BaseModel getById(String id) {
		
		return getDao().getById(id);
	}

	/**
	 * @return the dao
	 */
	public BaseDao getDao() {
		return dao;
	}

	/**
	 * @param dao the dao to set
	 */
	public void setDao(BaseDao dao) {
		this.dao = dao;
	}

	/**
	 * @return the modelToBo
	 */
	public BeanTransformer getModelToBo() {
		return modelToBo;
	}

	/**
	 * @param modelToBo the modelToBo to set
	 */
	public void setModelToBo(BeanTransformer modelToBo) {
		this.modelToBo = modelToBo;
	}

	/**
	 * @return the boToModel
	 */
	public BeanTransformer getBoToModel() {
		return BoToModel;
	}

	/**
	 * @param boToModel the boToModel to set
	 */
	public void setBoToModel(BeanTransformer boToModel) {
		BoToModel = boToModel;
	}

}
